﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" ValidateRequest="false" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="AspCategoriesEdit._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Welcome to Northwind Categories
    </h2>
    <div>
        <asp:Repeater ID="categoriesRepeater" runat="server">
            <HeaderTemplate>
                <h3>Northwind Categories</h3>
            </HeaderTemplate>
            <ItemTemplate>
                <div class="itemTemp">
                    <div class="itemText">
                        Name: <b><%# Server.HtmlEncode(Eval("CategoryName").ToString()) %></b>
                        <br/>
                        Description: <b><%# Server.HtmlEncode(Eval("Description").ToString()) %></b>                      
                    </div>
                    <div class="buttons">
                        <div class="button"><a href="Edit.aspx?id=<%# Eval("CategoryID") %>">Edit</a></div>
                        <div class="button"><a href="Delete.aspx?id=<%# Eval("CategoryID") %>">Delete</a></div>
                    </div>
                </div>
            </ItemTemplate>         
        </asp:Repeater>
        <div class="clear"></div>
        <div>
            <asp:Button ID="addButton" runat="server" Text="Add" 
                onclick="addButton_Click" />
        </div>
    </div> 
</asp:Content>
